import { usePageVariablesStoreHook } from "@/store/modules/pageVariables"

const usePageVariablesStore = usePageVariablesStoreHook()

export const titles = {
  id: 'id',// id
  unityId: '单位id',// unityId
  screenName: '大屏名称',// screenName
  screenLogo: '大屏logo',// screenLogo
  screenMode: '大屏菜单模式',// screenMode
  screenMenus: '大屏自定义菜单',// screenMenus
  screenTheme: '大屏主题',// screenTheme
  appTheme: 'APP应用主题',// appTheme
  action: '操作',
  menuName: '菜单名称',
  menuType: '菜单类型',// menuType
  url: '菜单信息',// url
}
export const prompt = {
  id: '请输入' + titles.id,
  unityId: '请输入' + titles.unityId,
  screenName: '请输入' + titles.screenName,
  screenLogo: '请上传' + titles.screenLogo,
  screenMode: '请选择' + titles.screenMode,
  screenMenus: '请选择' + titles.screenMenus,
  screenTheme: '请选择' + titles.screenTheme,
  appTheme: '请选择' + titles.appTheme,
  menuName: '请输入' + titles.menuName,
  menuType: '请选择' + titles.menuType,
  url: '请输入' + titles.url,
}
export const defaultSearchForm = () => {
  return {
    id: '',// id
    unityId: '',// unityId
    screenName: '',// screenName
    screenLogo: '',// screenLogo
    screenMode: '',// screenMode
    screenMenus: '',// screenMenus
    screenTheme: 'default',
    appTheme: 'default',
    page: 1,
    limit: 10,
  }
}
export type infoType = {
  id?: number,
  unityId?: number,
  screenName?: string,
  screenLogo?: string,
  screenMode?: number,
  screenTheme?:string,
  appTheme?:string,
  screenMenus?: {
    menuName: string,
    menuType: number,
    url: string
  }[],
}
export const defaultInfoForm = (): infoType => {
  return {
    id: usePageVariablesStore.getManage().unityId,// id
    unityId: null,// unityId
    screenName: null,// screenName
    screenLogo: null,// screenLogo
    screenMode: null,// screenMode
    screenTheme: 'default',
    appTheme: 'default',
    screenMenus: [],// screenMenus
  }
}
